package DecertifiSys.untill.baseUntill;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by zhoumeineng on 2018/1/31.
 */
public class TimeUntil {

    private static String dateFormatOne = "yyyyMMddHHmmSS";
    private static String getDateFormatTwo = "yyyy-MM-dd HH:mm:SS";

    /**
     * @param type 1：dateFormatOne 2：getDateFormatTwo
     * */
    public static String getCurrentTime(Integer type){
        SimpleDateFormat dateFormat = new SimpleDateFormat(type==1?dateFormatOne:getDateFormatTwo);
        Date now = new Date();
        return dateFormat.format(now);
    }
}
